package com.edrive.surveyor.comon;

import java.io.IOException;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.util.EntityUtils;


public class HttpRequest {
	
	public static String getResponse(String url) {
		HttpGet request= new HttpGet(url);
		try { 
			HttpResponse  response=AppConstant.HTTP_CLIENT.execute(request);
			HttpEntity entity = response.getEntity();
			String respStr = EntityUtils.toString(entity);
			
			
				return respStr;
					} catch (ClientProtocolException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) { 
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
		
	}

}
